#pragma once

#include <vector>

#include "arm.h"
#include "arminst.h"
#include "memobj.h"

struct ArmFunction : public Arm::Printable {
    std::string name;
    ArmBlock* entry;
    ArmBlock* exit;

    void Simplify();
    void SetParent();
    void Validate();

    void GenAsm(std::ostream& os) const override;
};

struct ArmProgram : public Arm::Printable {
    std::vector<Arm::GlobalVar> globalVars;
    std::vector<ArmFunction*> funcs;

    void GenAsm(std::ostream& os) const override;
};
